package com.chk.article.controller;



import com.chk.article.entity.Article;
import com.chk.article.service.ArticleService;
import com.chk.commom.utils.CommonResult;
import org.springframework.web.bind.annotation.*;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * (Article)表控制层
 *
 * @author makejava
 * @since 2023-10-20 10:58:47
 */
@RestController
@RequestMapping("article")
public class ArticleController{
    @Autowired
    private ArticleService articleService;
    @GetMapping("/{articleId}")
    public Article getArticleById(@PathVariable(value = "articleId") Integer articleId){
        return articleService.getArticleById(articleId);
    }
    @GetMapping
    public CommonResult test(){
        return CommonResult.okResult("os");
    }
}

